home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
machserver
/
1.098
/
sync
/
syncStat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-05
|
2KB
|
69 lines
/*
* syncStat.c --
*
* Keep and print statistics for the sync module.
*
* Copyright (C) 1985 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/src/kernel/sync/RCS/syncStat.c,v 9.1 90/10/05 17:50:31 mendel Exp $ SPRITE (Berkeley)";
#endif /* not lint */
#include <sprite.h>
#include <sync.h>
#include <stdio.h>
#include <bstring.h>
/*
*----------------------------------------------------------------------
*
* Sync_PrintStat --
*
* Print the sync module statistics.
*
* Results:
* None.
*
* Side effects:
* Do the prints.
*
*----------------------------------------------------------------------
*/
void
Sync_PrintStat()
{
int i;
int total;
printf("Sync Statistics\n");
total = 0;
for (i = 0; i < mach_NumProcessors; i++) {
total += sync_Instrument[i].numWakeups;
}
printf("numWakeups = %d\n", total);
total = 0;
for (i = 0; i < mach_NumProcessors; i++) {
total += sync_Instrument[i].numWakeupCalls;
}
printf("numWakeupCalls = %d\n", total);
total = 0;
for (i = 0; i < mach_NumProcessors; i++) {
total += sync_Instrument[i].numSpuriousWakeups;
}
printf("numSpuriousWakeups = %d\n", total);
total = 0;
for (i = 0; i < mach_NumProcessors; i++) {
total += sync_Instrument[i].numLocks;
}
printf("numLocks = %d\n", total);
total = 0;
for (i = 0; i < mach_NumProcessors; i++) {
total += sync_Instrument[i].numUnlocks;
}
printf("numUnlocks = %d\n", total);
}